<?php
Class Secompose extends Enregistrement {
	
	function __construct(Configuration $c, Basededonnees $b=NULL,
		$idepreuve="", $idquestion="") {
		parent::__construct($c,$b);
		$this->init($idepreuve,$idquestion);
	}
	
	public function init($epreuve="", $question="") {
		$this->table="secompose";
		$this->cle="idsecompose";
		$this->setidsecompose("");
		$this->setidepreuve($epreuve);
		$this->setidquestion($question);
	}
	
	public function vider() {
		parent::vider();
		$this->init();
	}
		
	public function setidsecompose($id,$recherche=false) {
		$c=new Champs("idsecompose",$id,"nombre");
		$c->setcle(true);
		$c->setlibelle("ID SeCompose");
		$c->setrecherche($recherche);
		$this->setchamps($c);
		
	}
	
	public function getidsecompose() {
		return $this->getunchamps("idsecompose")->getvaleur();
	}
	
	public function setidepreuve($epreuve) {
		$c=new Champs("idepreuve", $epreuve, "nombre");
		$c->setlibelle("ID Epreuve");
		$this->setchamps($c);
	}

	public function getidepreuve() {
		return $this->getunchamps("idepreuve")->getvaleur();
	}
	
	public function setidquestion($question) {
		$c=new Champs("idquestion", $question, "nombre");
		$c->setlibelle("ID Question");
		$this->setchamps($c);
	}

	public function getidquestion() {
		return $this->getunchamps("idquestion")->getvaleur();
	}
	
}
?>